<? 

include("../../core.php5/Grid.class.php");
include("../../core.php5/DB/DataBase.class.php");
include("../../core.php5/GridSource.class.php");
include("../../core.php5/GridPresenter.class.php");
include("../../core.php5/GUI/HtmlLink.class.php");
include("../../core.php5/GridLinker.class.php");
include "../../core.php5/GridSorter.class.php";
include "../../core.php5/GridSortPage.class.php";
include("../../core.php5/Utilities/Application.class.php");
include '../../core.php5/GUI/Album.class.php';

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
	<div id="">
			<h3>ADMINISTRADOR DE FOTOS</h3>
		<a href="javascript:;" onClick="get('select/albums.php','content')" class="agregar">Agregar album</a> | <a href="javascript:;" onClick="get('insert/fotos.php','content')" class="agregar">Agregar fotos</a><br />

<?php 

	$albumes=array();	
	$albumes=Album::getAlbums($albumes);
	//print_r($albumes);
   
?>
					<div class="box">
						<h2>Albumes</h2>						
						  <div class="imageRow">
						  <?php foreach ($albumes as $album) { 
						  		$foto=$album->foto;
						  		$nombre=explode(".", $foto->name);
						  		
						  	?>
						      <div class="single">
						  		  <a href="javascript:;" onclick="get('albumviewer.php?id=<?php echo $album->id ?>','content');" title="<?php echo $album->description?>" ><img src="../images/thumbnails/<?php echo $nombre[0];?>_thumb.jpg" alt="<?php echo $album->description?>" /><?php echo '<br>'.$album->description.'<br>';?>fotos: <?php echo $album->nofotos?></a>
						      </div>
						  <?php } ?>   
						  </div>
								
					</div>
					
					<br class="clearfix" />

	</div>
</body>
</html>